package com.uzai.console.mapper;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.cms.activity.CmsActivityDetailQuery;
import com.uzai.console.entity.CmsActivityDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface CmsActivityDetailMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int insert(CmsActivityDetail record);

    int insertSelective(CmsActivityDetail record);

    CmsActivityDetail selectById(@Param("id") Long id, @Param("merId") Long merId);

    int updateByIdSelective(CmsActivityDetail record);

    int updateById(CmsActivityDetail record);

    int deleteByActivityId(@Param("activityId") Long activityId, @Param("merId") Long merId);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<CmsActivityDetail> findByList(Page<CmsActivityDetail> page, @Param("query") CmsActivityDetailQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<CmsActivityDetail> findByList(@Param("query") CmsActivityDetailQuery query);
}